<?php
/*
	账户支付
	管理端支付接口
*/

defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'detail';
if($_RQ['op']=='detail'){
	if(!$_RQ['id']){
		exi('没有找到该图书，请重新选择！','error','jy_imgs/index/');
	}
	pdo_update('jy_imgs_list',array('readnum +='=>1),array('uniacid'=>$_SESSION['uniacid'],'id'=>$_RQ['id']));
	$item=pdo_get('jy_imgs_list',array('uniacid'=>$_SESSION['uniacid'],'id'=>$_RQ['id']));
	$item['images']=json_decode($item['images'],true);
	$item['pdf']=tomedia($item['pdf']);
	$item['indexurl']=custom_url('jy_imgs/index/',true);
	$return['item']=$item;
	$return['sharedata']=array(
		'title'=>$item['title'],
		'desc'=>$item['desc'],
		'link'=>custom_url('jy_imgs/detail//id='.$item['id'],true),
		'imgUrl'=>ATTACHMENT_URL.$item['image'],
	);
	$return['post']=array('id'=>$canyu['id'],'nowkey'=>$return['nowkey']);
	set_html('title',$item['title']);
	exi($return);
}